from moviepy.editor import *
from animation.editor import *

'''
7.	两个视频合成（画中画）
'''
if __name__ == '__main__':
    output_file_path = '../results/example07.mp4'
    hzwVideoClip = VideoFileClip('../videos/hzw_part.mp4')
    xyyVideoClip = VideoFileClip('../videos/xyy_part.mp4')
    finalClip = CompositeVideoClip([hzwVideoClip,
                                    xyyVideoClip.resize(width=xyyVideoClip.w / 3,
                                                        height=xyyVideoClip.h / 3).set_position(
                                        (hzwVideoClip.w / 3, hzwVideoClip.h / 3))])
    finalClip.write_videofile(output_file_path, fps=25, codec="libx264", audio_codec="aac")
